package com.example.mq.mqserver.core;

import java.io.Serializable;

/**
 * 表示消息的属性
 */
public class BasicProperties implements Serializable {
    private String messageId;

    //表示对应连接的BindingKey
    //DIRECT:routingKey 表示对应的队列名
    //FANOUT:routingKey 无意义
    //TOPIC: routingKey 与 bindingKey 一致的队列,消息才进行转发
    private String routingKey;

    //是否持久化 1:不持久化 2:持久化
    private int deliverMode = 1;

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getRoutingKey() {
        return routingKey;
    }

    public void setRoutingKey(String routingKey) {
        this.routingKey = routingKey;
    }

    public int getDeliverMode() {
        return deliverMode;
    }

    public void setDeliverMode(int deliverMode) {
        this.deliverMode = deliverMode;
    }
}
